home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7279 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: rcp6.elan.af.mil!rscernix!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.arch.arithmetic,comp.lang.c,comp.lang.c++
  4. Subject: Re: Access carry flag from C
  5. Date: 22 Feb 96 12:24:00 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.824991840@rscernix>
  8. References: <Dn1C9z.DGv.0.net@indra.com> <1996Feb1922.17.19.879@koobera.math.uic.edu> <31298D20.41C6@bazis.nl> <danpop.824859220@rscernix> <312AFACE.41C6@bazis.nl>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11.  
  12. In <312AFACE.41C6@bazis.nl> fkorntne@bazis.nl (Franz Korntner) writes:
  13.  
  14. >What will the future hold for 64 bit or larger machines. For the Alpha
  15. >they declared int to be a 32 bit datatype because too many coders relied
  16. >on this. 
  17.  
  18. No, this is not the real reason.  They made long and all pointers to
  19. be 64-bit (on OSF/1, OpenVMS is a pure 32-bit implementation on Alpha),
  20. despite the fact that a huge amount of existing software relied on silly
  21. assumptions like: long is 32 bits, or long is the same size as int, or
  22. any pointer can be stored in an int.  I had a hard time porting a piece
  23. of MIT-Athena software to the Alpha.
  24.  
  25. The real reason is that DEC wanted to have an integer type for all the
  26. sizes that could be supported by the hardware.  They could have made
  27. short a 32-bit type and int and long 64-bit, but they wouldn't have had
  28. any integer type for 16-bit integers left.
  29.  
  30. >Real pity as int should denote the natural size of the machine,
  31. >and in the case of the Alpha it should have been 64!
  32.  
  33. 32-bit is just as natural for Alpha as 64-bit (the architecture supports
  34. both 32 and 64-bit memory accesses).  Having two integer types of the same
  35. size on Alpha would have been a waste.  It _is_ a waste to have both int
  36. and long the same size on 32-bit platforms and add a non-standard long long
  37. type for 64-bit types (to avoid upsetting the customers whose brain-dead
  38. software would break if long and int would be different sizes).
  39.  
  40. Dan
  41. --
  42. Dan Pop
  43. CERN, CN Division
  44. Email: danpop@mail.cern.ch 
  45. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  46.